package org.yohailong.studyreactfrombilibili.dao.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author YoHaiLong
 * @since 2025-09-07
 */
@Getter
@Setter
@ToString
@TableName("comment")
public class CommentEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 评论唯一标识ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 发布评论的用户ID
     */
    private String userId;

    /**
     * 评论文本内容
     */
    private String content;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 评论获得的点赞数量
     */
    private Integer likeCount;

    /**
     * 评论发布时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
}
